package TAIC.IPLM ; 
import java.io.* ;
import java.util.* ;

public class TesterNambda {
	
	static public void main ( String s [] ) {
		int webStart , web , train,  Iteration , testImage , keys , nambda_b, nambda_e ;
		int i, j ;
		String dir ; 
		keys = 2 ; 
		try {
			Scanner scanner = new Scanner ( new File ( "test.conf" ) ) ;
			dir = scanner.next() ;
			dir+= "_n" ;
			File tempFile = new File ( "result\\" + dir ) ;
			if ( !tempFile.exists() ) tempFile.mkdirs () ;
			scanner.next() ;
			web = scanner.nextInt () ; scanner.nextInt () ; 
			scanner.next() ; 
			train = scanner.nextInt() ; scanner.nextInt () ; 
			scanner.next();
			testImage = scanner.nextInt();
			scanner.next() ;
			Iteration = scanner.nextInt() ; 
			scanner.next() ;
			keys = scanner.nextInt() ;
			scanner.next() ; 
			nambda_b = scanner.nextInt ();
			nambda_e = scanner.nextInt (); 
		
		PrintStream fout = null;
		if ( s.length == 0 ) fout = System.out ;
		else fout = new PrintStream ( new File ( "n_" + s[ 0 ] ) ) ;
		
		TestResult testResult  ;
		DataGen dataGen = new DataGen () ; 
			for ( i = nambda_b ; i <= nambda_e ; i ++ ) {
					testResult = dataGen.test( web , train , keys , testImage, Iteration , Math.pow(2.0,i) , "result\\" + dir + "\\") ; 
					fout.println ( testResult.average + " " + testResult.deviation ) ; 
				}
		}
		catch ( Exception e ) {
			e.printStackTrace () ;
		}
	}
	
	
}